package com.hjxr.sysadmin.zsj.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjxr.sysadmin.zsj.mapper.ProjectRecommendMapper;
import com.hjxr.sysadmin.zsj.domain.ProjectRecommend;
import com.hjxr.sysadmin.zsj.service.IProjectRecommendService;

/**
 * 推介项目详情Service业务层处理
 *
 * @author zc
 * @date 2021-03-25
 */
@Service
public class ProjectRecommendServiceImpl implements IProjectRecommendService
{
    @Autowired
    private ProjectRecommendMapper projectRecommendMapper;

    /**
     * 查询推介项目详情
     *
     * @param proId 推介项目详情ID
     * @return 推介项目详情
     */
    @Override
    public ProjectRecommend selectProjectRecommendById(Long proId)
    {
        return projectRecommendMapper.selectProjectRecommendById(proId);
    }

    /**
     * 查询推介项目详情列表
     *
     * @param projectRecommend 推介项目详情
     * @return 推介项目详情
     */
    @Override
    public List<ProjectRecommend> selectProjectRecommendList(ProjectRecommend projectRecommend)
    {
        return projectRecommendMapper.selectProjectRecommendList(projectRecommend);
    }

    /**
     * 新增推介项目详情
     *
     * @param projectRecommend 推介项目详情
     * @return 结果
     */
    @Override
    public int insertProjectRecommend(ProjectRecommend projectRecommend)
    {
        projectRecommend.setModifiedTime(new Date());
        return projectRecommendMapper.insertProjectRecommend(projectRecommend);
    }

    /**
     * 修改推介项目详情
     *
     * @param projectRecommend 推介项目详情
     * @return 结果
     */
    @Override
    public int updateProjectRecommend(ProjectRecommend projectRecommend)
    {
        projectRecommend.setModifiedTime(new Date());
        return projectRecommendMapper.updateProjectRecommend(projectRecommend);
    }

    /**
     * 批量删除推介项目详情
     *
     * @param proIds 需要删除的推介项目详情ID
     * @return 结果
     */
    @Override
    public int deleteProjectRecommendByIds(Long[] proIds)
    {
        return projectRecommendMapper.deleteProjectRecommendByIds(proIds);
    }

    /**
     * 删除推介项目详情信息
     *
     * @param proId 推介项目详情ID
     * @return 结果
     */
    @Override
    public int deleteProjectRecommendById(Long proId)
    {
        return projectRecommendMapper.deleteProjectRecommendById(proId);
    }
}
